package bairui.international.model.domain.jpa;

import com.lianjing.sh.project.wx.miniapp.model.domain.jpa.TBSuper_WX_App_UserInfo;

/**
 *
 * (用户)TB_User
 *
 * @说明
 * <pre>

 * </pre>
 *
 * @see Help_TB_User#inheritance() 继承体系信息
 *
 */
@org.hibernate.annotations.DynamicInsert
@org.hibernate.annotations.DynamicUpdate

@javax.persistence.Entity(name="t_user")
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@SuppressWarnings("serial")
@com.lianjing.sh.model.common.annotation.Comment("用户")
@com.lianjing.sh.processing.info.annotation.InfoComment("用户")
public class TB_User
 extends TBSuper_WX_App_UserInfo
 implements 
	com.lianjing.sh.model.common.stardard.TableModel<Long>,
	com.sh_lianjing.state.HasStatable,
	java.io.Serializable

{

	
	
	/**
	 * 必须属性赋值接口
	 */
	public static interface MustProperties{
		/** Openid */
		public String getOpenid();
		/** 类型 */
		public bairui.international.model.type.Type_User getType();
	}
	
	/**
	 * 为必须属性赋值
	 */
	public TB_User properties(MustProperties properties) {
		this.setOpenid(properties.getOpenid());
		this.setType(properties.getType());
		return this;
	}
	
	/**
	 *	必须属性构造函数
	 */
	public TB_User(MustProperties properties) {
		this.properties(properties);
	}
	
	
	/**
	 * 可选单属性赋值接口
	 */
	public static interface OptionalSingleProperties{
		/** Unionid */
		public String getUnionid();
		/** 用户登录态标识 */
		public String getSkey();
		/** 微信登录态标识 */
		public String getSessionKey();
		/** 昵称 */
		public String getNickName();
		/** 头像URL */
		public String getAvatarUrl();
		/** 性别 */
		public String getGender();
		/** 所在国家 */
		public String getCountry();
		/** 所在省份 */
		public String getProvince();
		/** 所在城市 */
		public String getCity();
		/** 语言 */
		public String getLanguage();
		/** 真实姓名 */
		public String getRealName();
		/** 电话 */
		public String getPhone();
		/** 公司 */
		public String getCompany();
		/** 二维码 */
		public String getDimensionalUrl();
		/** 用户账户 */
		public bairui.international.model.domain.jpa.TB_UserAmount getUserAmount();
		/** 提现账号 */
		public String getAccountNumber();
		/** 开户行 */
		public String getBank();
		/** 配送员 */
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getSender();
	}
	
	/**
	 * 为可选单属性赋值
	 */
	public TB_User properties(OptionalSingleProperties properties) {
		this.setUnionid(properties.getUnionid());
		this.setSkey(properties.getSkey());
		this.setSessionKey(properties.getSessionKey());
		this.setNickName(properties.getNickName());
		this.setAvatarUrl(properties.getAvatarUrl());
		this.setGender(properties.getGender());
		this.setCountry(properties.getCountry());
		this.setProvince(properties.getProvince());
		this.setCity(properties.getCity());
		this.setLanguage(properties.getLanguage());
		this.setRealName(properties.getRealName());
		this.setPhone(properties.getPhone());
		this.setCompany(properties.getCompany());
		this.setDimensionalUrl(properties.getDimensionalUrl());
		this.setUserAmount(properties.getUserAmount());
		this.setAccountNumber(properties.getAccountNumber());
		this.setBank(properties.getBank());
		this.setSender(properties.getSender());
		return this;
	}
	
	
	
	public TB_User(MustProperties must, OptionalSingleProperties optionalSingle) {
		this.properties(must);
		this.properties(optionalSingle);
	}
	
	/**
	 * 仅当前必须属性赋值接口
	 */
	public static interface CurrentMustProperties{
		/** 类型 */
		public bairui.international.model.type.Type_User getType();
	}
	
	/**
	 * 为仅当前必须属性赋值
	 */
	public TB_User properties(CurrentMustProperties properties) {
		this.setType(properties.getType());
		return this;
	}
	
	/**
	 * 仅当前可选单属性赋值接口
	 */
	public static interface CurrentOptionalSingleProperties{
		/** 真实姓名 */
		public String getRealName();
		/** 电话 */
		public String getPhone();
		/** 公司 */
		public String getCompany();
		/** 二维码 */
		public String getDimensionalUrl();
		/** 用户账户 */
		public bairui.international.model.domain.jpa.TB_UserAmount getUserAmount();
		/** 提现账号 */
		public String getAccountNumber();
		/** 开户行 */
		public String getBank();
		/** 配送员 */
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getSender();
	}
	
	/**
	 * 为仅当前可选单属性赋值
	 */
	public TB_User properties(CurrentOptionalSingleProperties properties) {
		this.setRealName(properties.getRealName());
		this.setPhone(properties.getPhone());
		this.setCompany(properties.getCompany());
		this.setDimensionalUrl(properties.getDimensionalUrl());
		this.setUserAmount(properties.getUserAmount());
		this.setAccountNumber(properties.getAccountNumber());
		this.setBank(properties.getBank());
		this.setSender(properties.getSender());
		return this;
	}
	
	public TB_User(
		@lombok.NonNull com.lianjing.sh.project.wx.miniapp.model.domain.jpa.TBSuper_WX_App_UserInfo bean,
		CurrentMustProperties mustProperties,
		CurrentOptionalSingleProperties optionalProperties
	) {
		this(bean);
		this.properties(mustProperties);
		this.properties(optionalProperties);
	}
	
	public TB_User(
		@lombok.NonNull com.lianjing.sh.project.wx.miniapp.model.domain.jpa.TBSuper_WX_App_UserInfo bean
	) {
		update(bean);
	}
	
	public TB_User update(com.lianjing.sh.project.wx.miniapp.model.domain.jpa.TBSuper_WX_App_UserInfo bean){
		this.setId(bean.getId());
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOpenid(bean.getOpenid());
		this.setUnionid(bean.getUnionid());
		this.setSkey(bean.getSkey());
		this.setSessionKey(bean.getSessionKey());
		this.setNickName(bean.getNickName());
		this.setAvatarUrl(bean.getAvatarUrl());
		this.setGender(bean.getGender());
		this.setCountry(bean.getCountry());
		this.setProvince(bean.getProvince());
		this.setCity(bean.getCity());
		this.setLanguage(bean.getLanguage());
		return this;
	}
	
	
	/**
	 * 更新属性内部类
	 */
	public abstract class UpdateProperties {
	
		public UpdateProperties() throws Exception {
			String openid = getOpenid(TB_User.this);
			if(isOverride_getOpenid){
				TB_User.this.setOpenid(openid);
			}
	
			String unionid = getUnionid(TB_User.this);
			if(isOverride_getUnionid){
				TB_User.this.setUnionid(unionid);
			}
	
			String skey = getSkey(TB_User.this);
			if(isOverride_getSkey){
				TB_User.this.setSkey(skey);
			}
	
			String sessionKey = getSessionKey(TB_User.this);
			if(isOverride_getSessionKey){
				TB_User.this.setSessionKey(sessionKey);
			}
	
			String nickName = getNickName(TB_User.this);
			if(isOverride_getNickName){
				TB_User.this.setNickName(nickName);
			}
	
			String avatarUrl = getAvatarUrl(TB_User.this);
			if(isOverride_getAvatarUrl){
				TB_User.this.setAvatarUrl(avatarUrl);
			}
	
			String gender = getGender(TB_User.this);
			if(isOverride_getGender){
				TB_User.this.setGender(gender);
			}
	
			String country = getCountry(TB_User.this);
			if(isOverride_getCountry){
				TB_User.this.setCountry(country);
			}
	
			String province = getProvince(TB_User.this);
			if(isOverride_getProvince){
				TB_User.this.setProvince(province);
			}
	
			String city = getCity(TB_User.this);
			if(isOverride_getCity){
				TB_User.this.setCity(city);
			}
	
			String language = getLanguage(TB_User.this);
			if(isOverride_getLanguage){
				TB_User.this.setLanguage(language);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> productOrders = getProductOrders(TB_User.this);
			if(isOverride_getProductOrders){
				TB_User.this.setProductOrders(productOrders);
			}
	
			String realName = getRealName(TB_User.this);
			if(isOverride_getRealName){
				TB_User.this.setRealName(realName);
			}
	
			String phone = getPhone(TB_User.this);
			if(isOverride_getPhone){
				TB_User.this.setPhone(phone);
			}
	
			String company = getCompany(TB_User.this);
			if(isOverride_getCompany){
				TB_User.this.setCompany(company);
			}
	
			bairui.international.model.type.Type_User type = getType(TB_User.this);
			if(isOverride_getType){
				TB_User.this.setType(type);
			}
	
			bairui.international.model.status.State_User state = getState(TB_User.this);
			if(isOverride_getState){
				TB_User.this.setState(state);
			}
	
			String dimensionalUrl = getDimensionalUrl(TB_User.this);
			if(isOverride_getDimensionalUrl){
				TB_User.this.setDimensionalUrl(dimensionalUrl);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_UserStateRecord> userStateRecords = getUserStateRecords(TB_User.this);
			if(isOverride_getUserStateRecords){
				TB_User.this.setUserStateRecords(userStateRecords);
			}
	
			bairui.international.model.domain.jpa.TB_UserAmount userAmount = getUserAmount(TB_User.this);
			if(isOverride_getUserAmount){
				TB_User.this.setUserAmount(userAmount);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ProxyAreaAddress> proxyAreaAddresss = getProxyAreaAddresss(TB_User.this);
			if(isOverride_getProxyAreaAddresss){
				TB_User.this.setProxyAreaAddresss(proxyAreaAddresss);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_UserGradeRecord> userGradeRecords = getUserGradeRecords(TB_User.this);
			if(isOverride_getUserGradeRecords){
				TB_User.this.setUserGradeRecords(userGradeRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_Address> addresss = getAddresss(TB_User.this);
			if(isOverride_getAddresss){
				TB_User.this.setAddresss(addresss);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> assignedTickets = getAssignedTickets(TB_User.this);
			if(isOverride_getAssignedTickets){
				TB_User.this.setAssignedTickets(assignedTickets);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentedRecords = getElectronicTicketPresentedRecords(TB_User.this);
			if(isOverride_getElectronicTicketPresentedRecords){
				TB_User.this.setElectronicTicketPresentedRecords(electronicTicketPresentedRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentRecords = getElectronicTicketPresentRecords(TB_User.this);
			if(isOverride_getElectronicTicketPresentRecords){
				TB_User.this.setElectronicTicketPresentRecords(electronicTicketPresentRecords);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> takedTickets = getTakedTickets(TB_User.this);
			if(isOverride_getTakedTickets){
				TB_User.this.setTakedTickets(takedTickets);
			}
	
			String accountNumber = getAccountNumber(TB_User.this);
			if(isOverride_getAccountNumber){
				TB_User.this.setAccountNumber(accountNumber);
			}
	
			String bank = getBank(TB_User.this);
			if(isOverride_getBank){
				TB_User.this.setBank(bank);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_UserAgentRequestOrder> userAgentRequestOrders = getUserAgentRequestOrders(TB_User.this);
			if(isOverride_getUserAgentRequestOrders){
				TB_User.this.setUserAgentRequestOrders(userAgentRequestOrders);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_WinPrize> winPrizes = getWinPrizes(TB_User.this);
			if(isOverride_getWinPrizes){
				TB_User.this.setWinPrizes(winPrizes);
			}
	
			java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> branchCompanyStaffs = getBranchCompanyStaffs(TB_User.this);
			if(isOverride_getBranchCompanyStaffs){
				TB_User.this.setBranchCompanyStaffs(branchCompanyStaffs);
			}
	
			bairui.international.model.domain.jpa.TB_BranchCompanyStaff sender = getSender(TB_User.this);
			if(isOverride_getSender){
				TB_User.this.setSender(sender);
			}
		}
	
		public TB_User up(){
			return TB_User.this;
		}
	
		/** Openid */
		private boolean isOverride_getOpenid = true;
		public String getOpenid(TB_User it) throws Exception { 
			isOverride_getOpenid = false; 
			return null;
		}
		/** Unionid */
		private boolean isOverride_getUnionid = true;
		public String getUnionid(TB_User it) throws Exception { 
			isOverride_getUnionid = false; 
			return null;
		}
		/** 用户登录态标识 */
		private boolean isOverride_getSkey = true;
		public String getSkey(TB_User it) throws Exception { 
			isOverride_getSkey = false; 
			return null;
		}
		/** 微信登录态标识 */
		private boolean isOverride_getSessionKey = true;
		public String getSessionKey(TB_User it) throws Exception { 
			isOverride_getSessionKey = false; 
			return null;
		}
		/** 昵称 */
		private boolean isOverride_getNickName = true;
		public String getNickName(TB_User it) throws Exception { 
			isOverride_getNickName = false; 
			return null;
		}
		/** 头像URL */
		private boolean isOverride_getAvatarUrl = true;
		public String getAvatarUrl(TB_User it) throws Exception { 
			isOverride_getAvatarUrl = false; 
			return null;
		}
		/** 性别 */
		private boolean isOverride_getGender = true;
		public String getGender(TB_User it) throws Exception { 
			isOverride_getGender = false; 
			return null;
		}
		/** 所在国家 */
		private boolean isOverride_getCountry = true;
		public String getCountry(TB_User it) throws Exception { 
			isOverride_getCountry = false; 
			return null;
		}
		/** 所在省份 */
		private boolean isOverride_getProvince = true;
		public String getProvince(TB_User it) throws Exception { 
			isOverride_getProvince = false; 
			return null;
		}
		/** 所在城市 */
		private boolean isOverride_getCity = true;
		public String getCity(TB_User it) throws Exception { 
			isOverride_getCity = false; 
			return null;
		}
		/** 语言 */
		private boolean isOverride_getLanguage = true;
		public String getLanguage(TB_User it) throws Exception { 
			isOverride_getLanguage = false; 
			return null;
		}
		/** 产品订单 */
		private boolean isOverride_getProductOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getProductOrders(TB_User it) throws Exception { 
			isOverride_getProductOrders = false; 
			return null;
		}
		/** 真实姓名 */
		private boolean isOverride_getRealName = true;
		public String getRealName(TB_User it) throws Exception { 
			isOverride_getRealName = false; 
			return null;
		}
		/** 电话 */
		private boolean isOverride_getPhone = true;
		public String getPhone(TB_User it) throws Exception { 
			isOverride_getPhone = false; 
			return null;
		}
		/** 公司 */
		private boolean isOverride_getCompany = true;
		public String getCompany(TB_User it) throws Exception { 
			isOverride_getCompany = false; 
			return null;
		}
		/** 类型 */
		private boolean isOverride_getType = true;
		public bairui.international.model.type.Type_User getType(TB_User it) throws Exception { 
			isOverride_getType = false; 
			return null;
		}
		/** 状态 */
		private boolean isOverride_getState = true;
		public bairui.international.model.status.State_User getState(TB_User it) throws Exception { 
			isOverride_getState = false; 
			return null;
		}
		/** 二维码 */
		private boolean isOverride_getDimensionalUrl = true;
		public String getDimensionalUrl(TB_User it) throws Exception { 
			isOverride_getDimensionalUrl = false; 
			return null;
		}
		/** 用户状态纪录 */
		private boolean isOverride_getUserStateRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_UserStateRecord> getUserStateRecords(TB_User it) throws Exception { 
			isOverride_getUserStateRecords = false; 
			return null;
		}
		/** 用户账户 */
		private boolean isOverride_getUserAmount = true;
		public bairui.international.model.domain.jpa.TB_UserAmount getUserAmount(TB_User it) throws Exception { 
			isOverride_getUserAmount = false; 
			return null;
		}
		/** 代理区域地址 */
		private boolean isOverride_getProxyAreaAddresss = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ProxyAreaAddress> getProxyAreaAddresss(TB_User it) throws Exception { 
			isOverride_getProxyAreaAddresss = false; 
			return null;
		}
		/** 用户积分记录 */
		private boolean isOverride_getUserGradeRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_UserGradeRecord> getUserGradeRecords(TB_User it) throws Exception { 
			isOverride_getUserGradeRecords = false; 
			return null;
		}
		/** 地址 */
		private boolean isOverride_getAddresss = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_Address> getAddresss(TB_User it) throws Exception { 
			isOverride_getAddresss = false; 
			return null;
		}
		/** 分配的电子券 */
		private boolean isOverride_getAssignedTickets = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> getAssignedTickets(TB_User it) throws Exception { 
			isOverride_getAssignedTickets = false; 
			return null;
		}
		/** 电子券接受赠送记录 */
		private boolean isOverride_getElectronicTicketPresentedRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> getElectronicTicketPresentedRecords(TB_User it) throws Exception { 
			isOverride_getElectronicTicketPresentedRecords = false; 
			return null;
		}
		/** 电子券赠送记录 */
		private boolean isOverride_getElectronicTicketPresentRecords = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> getElectronicTicketPresentRecords(TB_User it) throws Exception { 
			isOverride_getElectronicTicketPresentRecords = false; 
			return null;
		}
		/** 领取的电子券 */
		private boolean isOverride_getTakedTickets = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> getTakedTickets(TB_User it) throws Exception { 
			isOverride_getTakedTickets = false; 
			return null;
		}
		/** 提现账号 */
		private boolean isOverride_getAccountNumber = true;
		public String getAccountNumber(TB_User it) throws Exception { 
			isOverride_getAccountNumber = false; 
			return null;
		}
		/** 开户行 */
		private boolean isOverride_getBank = true;
		public String getBank(TB_User it) throws Exception { 
			isOverride_getBank = false; 
			return null;
		}
		/** 用户代理商申请单 */
		private boolean isOverride_getUserAgentRequestOrders = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_UserAgentRequestOrder> getUserAgentRequestOrders(TB_User it) throws Exception { 
			isOverride_getUserAgentRequestOrders = false; 
			return null;
		}
		/** 中奖 */
		private boolean isOverride_getWinPrizes = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_WinPrize> getWinPrizes(TB_User it) throws Exception { 
			isOverride_getWinPrizes = false; 
			return null;
		}
		/** 分公司员工 */
		private boolean isOverride_getBranchCompanyStaffs = true;
		public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> getBranchCompanyStaffs(TB_User it) throws Exception { 
			isOverride_getBranchCompanyStaffs = false; 
			return null;
		}
		/** 配送员 */
		private boolean isOverride_getSender = true;
		public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getSender(TB_User it) throws Exception { 
			isOverride_getSender = false; 
			return null;
		}
	
	}
	
	
	/**
	 * 构造函数
	 */
	public TB_User() {
	}
	
	public TB_User(
		@lombok.NonNull Long id
	) {
		this.setId(id);
	}
	
	public TB_User(
		@lombok.NonNull TB_User bean
	) {
		this.setId(bean.getId());
		this.setCreateTime(bean.getCreateTime());
		this.setModifyTime(bean.getModifyTime());
		this.setOpenid(bean.getOpenid());
		this.setUnionid(bean.getUnionid());
		this.setSkey(bean.getSkey());
		this.setSessionKey(bean.getSessionKey());
		this.setNickName(bean.getNickName());
		this.setAvatarUrl(bean.getAvatarUrl());
		this.setGender(bean.getGender());
		this.setCountry(bean.getCountry());
		this.setProvince(bean.getProvince());
		this.setCity(bean.getCity());
		this.setLanguage(bean.getLanguage());
		this.setProductOrders(bean.getProductOrders());
		this.setRealName(bean.getRealName());
		this.setPhone(bean.getPhone());
		this.setCompany(bean.getCompany());
		this.setType(bean.getType());
		this.setState(bean.getState());
		this.setDimensionalUrl(bean.getDimensionalUrl());
		this.setUserStateRecords(bean.getUserStateRecords());
		this.setUserAmount(bean.getUserAmount());
		this.setProxyAreaAddresss(bean.getProxyAreaAddresss());
		this.setUserGradeRecords(bean.getUserGradeRecords());
		this.setAddresss(bean.getAddresss());
		this.setAssignedTickets(bean.getAssignedTickets());
		this.setElectronicTicketPresentedRecords(bean.getElectronicTicketPresentedRecords());
		this.setElectronicTicketPresentRecords(bean.getElectronicTicketPresentRecords());
		this.setTakedTickets(bean.getTakedTickets());
		this.setAccountNumber(bean.getAccountNumber());
		this.setBank(bean.getBank());
		this.setUserAgentRequestOrders(bean.getUserAgentRequestOrders());
		this.setWinPrizes(bean.getWinPrizes());
		this.setBranchCompanyStaffs(bean.getBranchCompanyStaffs());
		this.setSender(bean.getSender());
	}
	
	

	


	/**
	 * 属性
	 */
	@com.lianjing.sh.model.common.annotation.Comment("产品订单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("产品订单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> productOrders;

	@com.lianjing.sh.model.common.annotation.Comment("真实姓名")
	@com.lianjing.sh.processing.info.annotation.InfoComment("真实姓名")
	@javax.persistence.Column(name="realName", length=30)
	private String realName;

	@com.lianjing.sh.model.common.annotation.Comment("电话")
	@com.lianjing.sh.processing.info.annotation.InfoComment("电话")
	@javax.persistence.Column(name="phone")
	private String phone;

	@com.lianjing.sh.model.common.annotation.Comment("公司")
	@com.lianjing.sh.processing.info.annotation.InfoComment("公司")
	@javax.persistence.Column(name="company")
	private String company;

	@com.lianjing.sh.model.common.annotation.Comment("类型")
	@com.lianjing.sh.processing.info.annotation.InfoComment("类型")
	@javax.persistence.Enumerated(javax.persistence.EnumType.STRING)
	@javax.persistence.Column(name="type", nullable=false)
	private bairui.international.model.type.Type_User type;

	@com.lianjing.sh.model.common.annotation.Comment("状态")
	@com.lianjing.sh.processing.info.annotation.InfoComment("状态")
	@javax.persistence.Enumerated(javax.persistence.EnumType.STRING)
	@org.hibernate.annotations.ColumnDefault("'Normaled'")
	@javax.persistence.Column(name="state", nullable=false)
	private bairui.international.model.status.State_User state;

	@com.lianjing.sh.model.common.annotation.Comment("二维码")
	@com.lianjing.sh.processing.info.annotation.InfoComment("二维码")
	@javax.persistence.Column(name="dimensionalUrl", length=255)
	private String dimensionalUrl;

	@com.lianjing.sh.model.common.annotation.Comment("用户状态纪录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户状态纪录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_UserStateRecord> userStateRecords;

	@com.lianjing.sh.model.common.annotation.Comment("用户账户")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户账户")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToOne(mappedBy="user")
	private bairui.international.model.domain.jpa.TB_UserAmount userAmount;

	@com.lianjing.sh.model.common.annotation.Comment("代理区域地址")
	@com.lianjing.sh.processing.info.annotation.InfoComment("代理区域地址")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_ProxyAreaAddress> proxyAreaAddresss;

	@com.lianjing.sh.model.common.annotation.Comment("用户积分记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户积分记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_UserGradeRecord> userGradeRecords;

	@com.lianjing.sh.model.common.annotation.Comment("地址")
	@com.lianjing.sh.processing.info.annotation.InfoComment("地址")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_Address> addresss;

	@com.lianjing.sh.model.common.annotation.Comment("分配的电子券")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分配的电子券")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="assignedUser")
	private java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> assignedTickets;

	@com.lianjing.sh.model.common.annotation.Comment("电子券接受赠送记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("电子券接受赠送记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="presenteder")
	private java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentedRecords;

	@com.lianjing.sh.model.common.annotation.Comment("电子券赠送记录")
	@com.lianjing.sh.processing.info.annotation.InfoComment("电子券赠送记录")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="presenter")
	private java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentRecords;

	@com.lianjing.sh.model.common.annotation.Comment("领取的电子券")
	@com.lianjing.sh.processing.info.annotation.InfoComment("领取的电子券")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="takor")
	private java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> takedTickets;

	@com.lianjing.sh.model.common.annotation.Comment("提现账号")
	@com.lianjing.sh.processing.info.annotation.InfoComment("提现账号")
	@javax.persistence.Column(name="accountNumber", length=50)
	private String accountNumber;

	@com.lianjing.sh.model.common.annotation.Comment("开户行")
	@com.lianjing.sh.processing.info.annotation.InfoComment("开户行")
	@javax.persistence.Column(name="bank", length=100)
	private String bank;

	@com.lianjing.sh.model.common.annotation.Comment("用户代理商申请单")
	@com.lianjing.sh.processing.info.annotation.InfoComment("用户代理商申请单")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_UserAgentRequestOrder> userAgentRequestOrders;

	@com.lianjing.sh.model.common.annotation.Comment("中奖")
	@com.lianjing.sh.processing.info.annotation.InfoComment("中奖")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_WinPrize> winPrizes;

	@com.lianjing.sh.model.common.annotation.Comment("分公司员工")
	@com.lianjing.sh.processing.info.annotation.InfoComment("分公司员工")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.OneToMany(mappedBy="user")
	private java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> branchCompanyStaffs;

	@com.lianjing.sh.model.common.annotation.Comment("配送员")
	@com.lianjing.sh.processing.info.annotation.InfoComment("配送员")
	@com.querydsl.core.annotations.QueryInit("*.*.*")
	@javax.persistence.ManyToOne()
	private bairui.international.model.domain.jpa.TB_BranchCompanyStaff sender;

	/** get[产品订单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> getProductOrders() {
		return this.productOrders;
	}

	/** get[真实姓名] */
	public String getRealName() {
		return this.realName;
	}

	/** get[电话] */
	public String getPhone() {
		return this.phone;
	}

	/** get[公司] */
	public String getCompany() {
		return this.company;
	}

	/** get[类型] */
	public bairui.international.model.type.Type_User getType() {
		return this.type;
	}

	/** get[状态] */
	public bairui.international.model.status.State_User getState() {
		return this.state;
	}

	/** get[二维码] */
	public String getDimensionalUrl() {
		return this.dimensionalUrl;
	}

	/** get[用户状态纪录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_UserStateRecord> getUserStateRecords() {
		return this.userStateRecords;
	}

	/** get[用户账户] */
	public bairui.international.model.domain.jpa.TB_UserAmount getUserAmount() {
		return this.userAmount;
	}

	/** get[代理区域地址] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ProxyAreaAddress> getProxyAreaAddresss() {
		return this.proxyAreaAddresss;
	}

	/** get[用户积分记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_UserGradeRecord> getUserGradeRecords() {
		return this.userGradeRecords;
	}

	/** get[地址] */
	public java.util.List<bairui.international.model.domain.jpa.TB_Address> getAddresss() {
		return this.addresss;
	}

	/** get[分配的电子券] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> getAssignedTickets() {
		return this.assignedTickets;
	}

	/** get[电子券接受赠送记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> getElectronicTicketPresentedRecords() {
		return this.electronicTicketPresentedRecords;
	}

	/** get[电子券赠送记录] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> getElectronicTicketPresentRecords() {
		return this.electronicTicketPresentRecords;
	}

	/** get[领取的电子券] */
	public java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> getTakedTickets() {
		return this.takedTickets;
	}

	/** get[提现账号] */
	public String getAccountNumber() {
		return this.accountNumber;
	}

	/** get[开户行] */
	public String getBank() {
		return this.bank;
	}

	/** get[用户代理商申请单] */
	public java.util.List<bairui.international.model.domain.jpa.TB_UserAgentRequestOrder> getUserAgentRequestOrders() {
		return this.userAgentRequestOrders;
	}

	/** get[中奖] */
	public java.util.List<bairui.international.model.domain.jpa.TB_WinPrize> getWinPrizes() {
		return this.winPrizes;
	}

	/** get[分公司员工] */
	public java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> getBranchCompanyStaffs() {
		return this.branchCompanyStaffs;
	}

	/** get[配送员] */
	public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getSender() {
		return this.sender;
	}

	/** set[产品订单] */
	public void setProductOrders(java.util.List<bairui.international.model.domain.jpa.TB_ProductOrder> productOrders) {
		this.productOrders = productOrders;
	}

	/** set[真实姓名] */
	public void setRealName(String realName) {
		this.realName = realName;
	}

	/** set[电话] */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/** set[公司] */
	public void setCompany(String company) {
		this.company = company;
	}

	/** set[类型] */
	public void setType(bairui.international.model.type.Type_User type) {
		this.type = type;
	}

	/** set[状态] */
	public void setState(bairui.international.model.status.State_User state) {
		this.state = state;
	}

	/** set[二维码] */
	public void setDimensionalUrl(String dimensionalUrl) {
		this.dimensionalUrl = dimensionalUrl;
	}

	/** set[用户状态纪录] */
	public void setUserStateRecords(java.util.List<bairui.international.model.domain.jpa.TB_UserStateRecord> userStateRecords) {
		this.userStateRecords = userStateRecords;
	}

	/** set[用户账户] */
	public void setUserAmount(bairui.international.model.domain.jpa.TB_UserAmount userAmount) {
		this.userAmount = userAmount;
	}

	/** set[代理区域地址] */
	public void setProxyAreaAddresss(java.util.List<bairui.international.model.domain.jpa.TB_ProxyAreaAddress> proxyAreaAddresss) {
		this.proxyAreaAddresss = proxyAreaAddresss;
	}

	/** set[用户积分记录] */
	public void setUserGradeRecords(java.util.List<bairui.international.model.domain.jpa.TB_UserGradeRecord> userGradeRecords) {
		this.userGradeRecords = userGradeRecords;
	}

	/** set[地址] */
	public void setAddresss(java.util.List<bairui.international.model.domain.jpa.TB_Address> addresss) {
		this.addresss = addresss;
	}

	/** set[分配的电子券] */
	public void setAssignedTickets(java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> assignedTickets) {
		this.assignedTickets = assignedTickets;
	}

	/** set[电子券接受赠送记录] */
	public void setElectronicTicketPresentedRecords(java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentedRecords) {
		this.electronicTicketPresentedRecords = electronicTicketPresentedRecords;
	}

	/** set[电子券赠送记录] */
	public void setElectronicTicketPresentRecords(java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord> electronicTicketPresentRecords) {
		this.electronicTicketPresentRecords = electronicTicketPresentRecords;
	}

	/** set[领取的电子券] */
	public void setTakedTickets(java.util.List<bairui.international.model.domain.jpa.TB_ElectronicTicket> takedTickets) {
		this.takedTickets = takedTickets;
	}

	/** set[提现账号] */
	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	/** set[开户行] */
	public void setBank(String bank) {
		this.bank = bank;
	}

	/** set[用户代理商申请单] */
	public void setUserAgentRequestOrders(java.util.List<bairui.international.model.domain.jpa.TB_UserAgentRequestOrder> userAgentRequestOrders) {
		this.userAgentRequestOrders = userAgentRequestOrders;
	}

	/** set[中奖] */
	public void setWinPrizes(java.util.List<bairui.international.model.domain.jpa.TB_WinPrize> winPrizes) {
		this.winPrizes = winPrizes;
	}

	/** set[分公司员工] */
	public void setBranchCompanyStaffs(java.util.List<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> branchCompanyStaffs) {
		this.branchCompanyStaffs = branchCompanyStaffs;
	}

	/** set[配送员] */
	public void setSender(bairui.international.model.domain.jpa.TB_BranchCompanyStaff sender) {
		this.sender = sender;
	}



	public void assignUserAmount(bairui.international.model.domain.jpa.TB_UserAmount userAmount) {
		if(null != userAmount){
			userAmount.setUser(this);
		}
		this.setUserAmount(userAmount);
	}
	











	public void assignSender(bairui.international.model.domain.jpa.TB_BranchCompanyStaff sender) {
		if(null != sender){
			sender.addCustomers(this);
		}
		this.setSender(sender);
	}
	

	/** add[ProductOrders] */
	public TB_User addProductOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... productOrders){
		if(this.productOrders == null){
			this.productOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : productOrders){
			bean.setUser(this);
			this.productOrders.add(bean);
		}
		return this;
	}
	/** add[UserStateRecords] */
	public TB_User addUserStateRecords(bairui.international.model.domain.jpa.TB_UserStateRecord ... userStateRecords){
		if(this.userStateRecords == null){
			this.userStateRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_UserStateRecord bean : userStateRecords){
			bean.setUser(this);
			this.userStateRecords.add(bean);
		}
		return this;
	}
	/** add[ProxyAreaAddresss] */
	public TB_User addProxyAreaAddresss(bairui.international.model.domain.jpa.TB_ProxyAreaAddress ... proxyAreaAddresss){
		if(this.proxyAreaAddresss == null){
			this.proxyAreaAddresss = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ProxyAreaAddress bean : proxyAreaAddresss){
			bean.setUser(this);
			this.proxyAreaAddresss.add(bean);
		}
		return this;
	}
	/** add[UserGradeRecords] */
	public TB_User addUserGradeRecords(bairui.international.model.domain.jpa.TB_UserGradeRecord ... userGradeRecords){
		if(this.userGradeRecords == null){
			this.userGradeRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_UserGradeRecord bean : userGradeRecords){
			bean.setUser(this);
			this.userGradeRecords.add(bean);
		}
		return this;
	}
	/** add[Addresss] */
	public TB_User addAddresss(bairui.international.model.domain.jpa.TB_Address ... addresss){
		if(this.addresss == null){
			this.addresss = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_Address bean : addresss){
			bean.setUser(this);
			this.addresss.add(bean);
		}
		return this;
	}
	/** add[AssignedTickets] */
	public TB_User addAssignedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... assignedTickets){
		if(this.assignedTickets == null){
			this.assignedTickets = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicket bean : assignedTickets){
			bean.setAssignedUser(this);
			this.assignedTickets.add(bean);
		}
		return this;
	}
	/** add[ElectronicTicketPresentedRecords] */
	public TB_User addElectronicTicketPresentedRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentedRecords){
		if(this.electronicTicketPresentedRecords == null){
			this.electronicTicketPresentedRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord bean : electronicTicketPresentedRecords){
			bean.setPresenteder(this);
			this.electronicTicketPresentedRecords.add(bean);
		}
		return this;
	}
	/** add[ElectronicTicketPresentRecords] */
	public TB_User addElectronicTicketPresentRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentRecords){
		if(this.electronicTicketPresentRecords == null){
			this.electronicTicketPresentRecords = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord bean : electronicTicketPresentRecords){
			bean.setPresenter(this);
			this.electronicTicketPresentRecords.add(bean);
		}
		return this;
	}
	/** add[TakedTickets] */
	public TB_User addTakedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... takedTickets){
		if(this.takedTickets == null){
			this.takedTickets = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicket bean : takedTickets){
			bean.setTakor(this);
			this.takedTickets.add(bean);
		}
		return this;
	}
	/** add[UserAgentRequestOrders] */
	public TB_User addUserAgentRequestOrders(bairui.international.model.domain.jpa.TB_UserAgentRequestOrder ... userAgentRequestOrders){
		if(this.userAgentRequestOrders == null){
			this.userAgentRequestOrders = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_UserAgentRequestOrder bean : userAgentRequestOrders){
			bean.setUser(this);
			this.userAgentRequestOrders.add(bean);
		}
		return this;
	}
	/** add[WinPrizes] */
	public TB_User addWinPrizes(bairui.international.model.domain.jpa.TB_WinPrize ... winPrizes){
		if(this.winPrizes == null){
			this.winPrizes = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_WinPrize bean : winPrizes){
			bean.setUser(this);
			this.winPrizes.add(bean);
		}
		return this;
	}
	/** add[BranchCompanyStaffs] */
	public TB_User addBranchCompanyStaffs(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... branchCompanyStaffs){
		if(this.branchCompanyStaffs == null){
			this.branchCompanyStaffs = new java.util.ArrayList<>();
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaff bean : branchCompanyStaffs){
			bean.setUser(this);
			this.branchCompanyStaffs.add(bean);
		}
		return this;
	}
	
	/** remove[ProductOrders] */
	public TB_User removeProductOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... productOrders){
		if(this.productOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ProductOrder bean : productOrders){
			bean.setUser(null);
			this.productOrders.remove(bean);
		}
		return this;
	}
	/** remove[UserStateRecords] */
	public TB_User removeUserStateRecords(bairui.international.model.domain.jpa.TB_UserStateRecord ... userStateRecords){
		if(this.userStateRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_UserStateRecord bean : userStateRecords){
			bean.setUser(null);
			this.userStateRecords.remove(bean);
		}
		return this;
	}
	/** remove[ProxyAreaAddresss] */
	public TB_User removeProxyAreaAddresss(bairui.international.model.domain.jpa.TB_ProxyAreaAddress ... proxyAreaAddresss){
		if(this.proxyAreaAddresss == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ProxyAreaAddress bean : proxyAreaAddresss){
			bean.setUser(null);
			this.proxyAreaAddresss.remove(bean);
		}
		return this;
	}
	/** remove[UserGradeRecords] */
	public TB_User removeUserGradeRecords(bairui.international.model.domain.jpa.TB_UserGradeRecord ... userGradeRecords){
		if(this.userGradeRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_UserGradeRecord bean : userGradeRecords){
			bean.setUser(null);
			this.userGradeRecords.remove(bean);
		}
		return this;
	}
	/** remove[Addresss] */
	public TB_User removeAddresss(bairui.international.model.domain.jpa.TB_Address ... addresss){
		if(this.addresss == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_Address bean : addresss){
			bean.setUser(null);
			this.addresss.remove(bean);
		}
		return this;
	}
	/** remove[AssignedTickets] */
	public TB_User removeAssignedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... assignedTickets){
		if(this.assignedTickets == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicket bean : assignedTickets){
			bean.setAssignedUser(null);
			this.assignedTickets.remove(bean);
		}
		return this;
	}
	/** remove[ElectronicTicketPresentedRecords] */
	public TB_User removeElectronicTicketPresentedRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentedRecords){
		if(this.electronicTicketPresentedRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord bean : electronicTicketPresentedRecords){
			bean.setPresenteder(null);
			this.electronicTicketPresentedRecords.remove(bean);
		}
		return this;
	}
	/** remove[ElectronicTicketPresentRecords] */
	public TB_User removeElectronicTicketPresentRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentRecords){
		if(this.electronicTicketPresentRecords == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord bean : electronicTicketPresentRecords){
			bean.setPresenter(null);
			this.electronicTicketPresentRecords.remove(bean);
		}
		return this;
	}
	/** remove[TakedTickets] */
	public TB_User removeTakedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... takedTickets){
		if(this.takedTickets == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_ElectronicTicket bean : takedTickets){
			bean.setTakor(null);
			this.takedTickets.remove(bean);
		}
		return this;
	}
	/** remove[UserAgentRequestOrders] */
	public TB_User removeUserAgentRequestOrders(bairui.international.model.domain.jpa.TB_UserAgentRequestOrder ... userAgentRequestOrders){
		if(this.userAgentRequestOrders == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_UserAgentRequestOrder bean : userAgentRequestOrders){
			bean.setUser(null);
			this.userAgentRequestOrders.remove(bean);
		}
		return this;
	}
	/** remove[WinPrizes] */
	public TB_User removeWinPrizes(bairui.international.model.domain.jpa.TB_WinPrize ... winPrizes){
		if(this.winPrizes == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_WinPrize bean : winPrizes){
			bean.setUser(null);
			this.winPrizes.remove(bean);
		}
		return this;
	}
	/** remove[BranchCompanyStaffs] */
	public TB_User removeBranchCompanyStaffs(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... branchCompanyStaffs){
		if(this.branchCompanyStaffs == null){
			return this;
		}
		for(bairui.international.model.domain.jpa.TB_BranchCompanyStaff bean : branchCompanyStaffs){
			bean.setUser(null);
			this.branchCompanyStaffs.remove(bean);
		}
		return this;
	}
	
	/**
	 * contains[ProductOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsProductOrders(bairui.international.model.domain.jpa.TB_ProductOrder ... productOrders){
		if(this.productOrders == null || productOrders==null || productOrders.length<=0){
			return false;
		}
		return this.productOrders.containsAll(java.util.Arrays.asList(productOrders));
	}
	/**
	 * contains[UserStateRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsUserStateRecords(bairui.international.model.domain.jpa.TB_UserStateRecord ... userStateRecords){
		if(this.userStateRecords == null || userStateRecords==null || userStateRecords.length<=0){
			return false;
		}
		return this.userStateRecords.containsAll(java.util.Arrays.asList(userStateRecords));
	}
	/**
	 * contains[ProxyAreaAddresss]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsProxyAreaAddresss(bairui.international.model.domain.jpa.TB_ProxyAreaAddress ... proxyAreaAddresss){
		if(this.proxyAreaAddresss == null || proxyAreaAddresss==null || proxyAreaAddresss.length<=0){
			return false;
		}
		return this.proxyAreaAddresss.containsAll(java.util.Arrays.asList(proxyAreaAddresss));
	}
	/**
	 * contains[UserGradeRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsUserGradeRecords(bairui.international.model.domain.jpa.TB_UserGradeRecord ... userGradeRecords){
		if(this.userGradeRecords == null || userGradeRecords==null || userGradeRecords.length<=0){
			return false;
		}
		return this.userGradeRecords.containsAll(java.util.Arrays.asList(userGradeRecords));
	}
	/**
	 * contains[Addresss]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsAddresss(bairui.international.model.domain.jpa.TB_Address ... addresss){
		if(this.addresss == null || addresss==null || addresss.length<=0){
			return false;
		}
		return this.addresss.containsAll(java.util.Arrays.asList(addresss));
	}
	/**
	 * contains[AssignedTickets]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsAssignedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... assignedTickets){
		if(this.assignedTickets == null || assignedTickets==null || assignedTickets.length<=0){
			return false;
		}
		return this.assignedTickets.containsAll(java.util.Arrays.asList(assignedTickets));
	}
	/**
	 * contains[ElectronicTicketPresentedRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsElectronicTicketPresentedRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentedRecords){
		if(this.electronicTicketPresentedRecords == null || electronicTicketPresentedRecords==null || electronicTicketPresentedRecords.length<=0){
			return false;
		}
		return this.electronicTicketPresentedRecords.containsAll(java.util.Arrays.asList(electronicTicketPresentedRecords));
	}
	/**
	 * contains[ElectronicTicketPresentRecords]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsElectronicTicketPresentRecords(bairui.international.model.domain.jpa.TB_ElectronicTicketPresentRecord ... electronicTicketPresentRecords){
		if(this.electronicTicketPresentRecords == null || electronicTicketPresentRecords==null || electronicTicketPresentRecords.length<=0){
			return false;
		}
		return this.electronicTicketPresentRecords.containsAll(java.util.Arrays.asList(electronicTicketPresentRecords));
	}
	/**
	 * contains[TakedTickets]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsTakedTickets(bairui.international.model.domain.jpa.TB_ElectronicTicket ... takedTickets){
		if(this.takedTickets == null || takedTickets==null || takedTickets.length<=0){
			return false;
		}
		return this.takedTickets.containsAll(java.util.Arrays.asList(takedTickets));
	}
	/**
	 * contains[UserAgentRequestOrders]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsUserAgentRequestOrders(bairui.international.model.domain.jpa.TB_UserAgentRequestOrder ... userAgentRequestOrders){
		if(this.userAgentRequestOrders == null || userAgentRequestOrders==null || userAgentRequestOrders.length<=0){
			return false;
		}
		return this.userAgentRequestOrders.containsAll(java.util.Arrays.asList(userAgentRequestOrders));
	}
	/**
	 * contains[WinPrizes]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsWinPrizes(bairui.international.model.domain.jpa.TB_WinPrize ... winPrizes){
		if(this.winPrizes == null || winPrizes==null || winPrizes.length<=0){
			return false;
		}
		return this.winPrizes.containsAll(java.util.Arrays.asList(winPrizes));
	}
	/**
	 * contains[BranchCompanyStaffs]
	 *
	 * 全部输入都包含：返回 true
	 * 输入中有至少有一个不包含：返回 false
	 */
	public boolean containsBranchCompanyStaffs(bairui.international.model.domain.jpa.TB_BranchCompanyStaff ... branchCompanyStaffs){
		if(this.branchCompanyStaffs == null || branchCompanyStaffs==null || branchCompanyStaffs.length<=0){
			return false;
		}
		return this.branchCompanyStaffs.containsAll(java.util.Arrays.asList(branchCompanyStaffs));
	}
	

	/** take[用户账户] */
	public bairui.international.model.domain.jpa.TB_UserAmount takeUserAmount(){
		if(null == this.userAmount){
			this.userAmount = new bairui.international.model.domain.jpa.TB_UserAmount();
		}
		return this.userAmount;
	}
	
	/** take[配送员] */
	public bairui.international.model.domain.jpa.TB_BranchCompanyStaff takeSender(){
		if(null == this.sender){
			this.sender = new bairui.international.model.domain.jpa.TB_BranchCompanyStaff();
		}
		return this.sender;
	}
	
	
	/** optional[用户账户] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_UserAmount> optionalUserAmount() {
		return java.util.Optional.ofNullable(this.userAmount);
	}
	
	/** optional[配送员] */
	public java.util.Optional<bairui.international.model.domain.jpa.TB_BranchCompanyStaff> optionalSender() {
		return java.util.Optional.ofNullable(this.sender);
	}
	

	/**
	 * 复写 hashCode
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		return prime * result + ((this.getId() == null) ? 0 : this.getId().hashCode());
	}
	
	/**
	 * 复写 equals
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		TB_User other = (TB_User) obj;
		if (this.getId() == null) {
			return false;
		} else if (!this.getId().equals(other.getId())){
			return false;
		}
		return true;
	}
	

	/**
	 * 用来覆盖toString()的输出
	 */
	@javax.persistence.Transient
	private String toString;
	
	public void setToString(String toString) {
		this.toString = toString;
	}
	
	/**
	 * 复写 toString
	 */
	@Override
	public String toString() {
		if(null != this.toString){
			return this.toString;
		}
		return super.toString();
	}	

	@javax.persistence.PrePersist
	public void prePersist() {
		this.setCreateTime(new java.util.Date());
		this.setModifyTime(new java.util.Date());
	}
	
	@javax.persistence.PreUpdate
	public void preUpdate() {
		this.setModifyTime(new java.util.Date());
	}

	/**
	 * 状态相关
	 */
	public bairui.international.model.status.State_User state(){
		return this.getState();
	}


}
